import java.net.InetAddress;
import java.net.UnknownHostException;

public class Test1 {
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			// 03-28 11:33:58.975: I/Mrpoid(2178):
			// mr_getHostByName(proxy2.51mrp.com)
			
			int c = (int) Long.parseLong("80000000", 16);
			System.out.printf("%x", c);

			InetAddress[] addresses = InetAddress.getAllByName("proxy2.51mrp.com");
			for (InetAddress a : addresses) {
				byte[] ba = a.getAddress();

				int ip = 0;
				for(int i=0; i<4; ++i){
					ip += (ba[i] & 0xff) << (8*(3-i));
				}
				
				// Integer.
				System.out.printf("%x", ip);

				System.out.println("ip:" + new String(a.getAddress()));
			}
		} catch (UnknownHostException e) {
			e.printStackTrace();
		}
	}

}
